/* Class20 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */

public class Class20 {
	public static JString aClass3_387;
	public static JString aClass3_388;
	public static JString aClass3_389 = Class39_Sub5_Sub9.createJString(125, "(U2");
	public static Resource aClass56_390;
	public static int[][] anIntArrayArray391;
	public static Class39_Sub5_Sub10_Sub3[] aClass39_Sub5_Sub10_Sub3Array392;
	public static int anInt393;
	public static JString aClass3_394;
	public static Class13 aClass13_395;
	public static Deque[][][] groundItems;
	public static int anInt397;

	public static void method246(long l, byte i) {
		if (l != 0L) {
			for (int i_0_ = 0; i_0_ < Class4.anInt62; i_0_++) {
				if (Applet_Sub1.aLongArray2[i_0_] == l) {
					Class39_Sub14.aBoolean1520 = true;
					Class4.anInt62--;
					for (int i_1_ = i_0_; Class4.anInt62 > i_1_; i_1_++) {
						Class39_Sub5_Sub4_Sub1.aClass3Array2188[i_1_] = (Class39_Sub5_Sub4_Sub1.aClass3Array2188[i_1_ + 1]);
						Player.anIntArray2533[i_1_] = (Player.anIntArray2533[i_1_ + 1]);
						Applet_Sub1.aLongArray2[i_1_] = Applet_Sub1.aLongArray2[i_1_ + 1];
					}
					PacketStream.outputStream.writePacket(159);
					PacketStream.outputStream.writeLong(true, l);
					break;
				}
			}
			int i_2_ = -61 / ((-84 - i) / 38);
		}
	}

	public static void method247(byte i) {
		aClass13_395 = null;
		aClass3_387 = null;
		aClass39_Sub5_Sub10_Sub3Array392 = null;
		aClass56_390 = null;
		aClass3_388 = null;
		aClass3_394 = null;
		aClass3_389 = null;
		anIntArrayArray391 = null;
		groundItems = null;
	}

	public static boolean drawInterface(RSInterface[] class39_sub5_sub17s, int i, int i_3_, int i_4_, int i_5_, int i_6_, int i_7_, int i_8_, int i_9_, int i_10_) {
		Class39_Sub5_Sub10.method619(i_10_, i_5_, i_7_, i_9_);
		boolean bool = true;
		for (int i_11_ = 0; i_11_ < class39_sub5_sub17s.length; i_11_++) {
			RSInterface class39_sub5_sub17 = class39_sub5_sub17s[i_11_];
			if (class39_sub5_sub17 != null && class39_sub5_sub17.anInt2050 == i_4_) {
				if (class39_sub5_sub17.anInt2078 > 0)
					CacheIO.method123(class39_sub5_sub17, 114);
				int i_12_ = -i_6_ + i_10_ + class39_sub5_sub17.mainX;
				int i_13_ = class39_sub5_sub17.mainY + (i_5_ - i_3_);
				int i_14_ = class39_sub5_sub17.anInt2030;
				if (Class39_Sub5_Sub13.aClass39_Sub5_Sub17_1864 == class39_sub5_sub17) {
					RSInterface class39_sub5_sub17_15_ = Class44.method914(class39_sub5_sub17, (byte) -126);
					if (class39_sub5_sub17_15_ == null)
						Class39_Sub5_Sub13.aClass39_Sub5_Sub17_1864 = null;
					else {
						int[] is = Class65.method1094(-6622, class39_sub5_sub17_15_);
						int[] is_16_ = Class65.method1094(i_8_ ^ ~0x3fae, class39_sub5_sub17);
						if (!class39_sub5_sub17.aBoolean2108)
							i_14_ = 128;
						int i_17_ = Class33.anInt599 - CacheArchive.anInt1303;
						int i_18_ = -Class39_Sub5_Sub1.anInt1684 + ISAAC.anInt1091;
						if (i_18_ <= class39_sub5_sub17.anInt2056 && -class39_sub5_sub17.anInt2056 <= i_18_ && i_17_ <= class39_sub5_sub17.anInt2056 && i_17_ >= -class39_sub5_sub17.anInt2056 && !Class37.aBoolean654) {
							i_18_ = 0;
							i_17_ = 0;
						} else if ((class39_sub5_sub17.anInt2008 < Applet_Sub1.anInt8) || Class37.aBoolean654)
							Class37.aBoolean654 = true;
						else {
							i_17_ = 0;
							i_18_ = 0;
						}
						int i_19_ = is_16_[1] - is[1] + i_17_;
						if (i_19_ < 0)
							i_19_ = 0;
						int i_20_ = i_18_ + is_16_[0] - is[0];
						if (i_20_ < 0)
							i_20_ = 0;
						if (class39_sub5_sub17.anInt2104 + i_20_ > class39_sub5_sub17_15_.anInt2104)
							i_20_ = (class39_sub5_sub17_15_.anInt2104 - class39_sub5_sub17.anInt2104);
						if (class39_sub5_sub17_15_.anInt2015 < i_19_ + class39_sub5_sub17.anInt2015)
							i_19_ = (class39_sub5_sub17_15_.anInt2015 - class39_sub5_sub17.anInt2015);
						i_12_ = i_20_ + is[0];
						i_13_ = i_19_ + is[1];
					}
				}
				if ((!class39_sub5_sub17.aBoolean2013 || (i_12_ <= Class39_Sub5_Sub10.anInt1823 && i_13_ <= Class39_Sub5_Sub10.anInt1819 && (Class39_Sub5_Sub10.anInt1824 <= i_12_ + class39_sub5_sub17.anInt2104) && (Class39_Sub5_Sub10.anInt1820 <= i_13_ + class39_sub5_sub17.anInt2015))) && (!class39_sub5_sub17.aBoolean2013 || !class39_sub5_sub17.method754(125, Class19.aBoolean361))) {
					if (class39_sub5_sub17.drawType == 0) {
						if (!class39_sub5_sub17.aBoolean2013 && class39_sub5_sub17.method754(127, Class19.aBoolean361) && !Class39_Sub5_Sub1.method473(i, -1, i_11_))
							continue;
						if (!class39_sub5_sub17.aBoolean2013) {
							if (class39_sub5_sub17.anInt1994 > (-class39_sub5_sub17.anInt2015 + class39_sub5_sub17.anInt2095))
								class39_sub5_sub17.anInt1994 = (-class39_sub5_sub17.anInt2015 + class39_sub5_sub17.anInt2095);
							if (class39_sub5_sub17.anInt1994 < 0)
								class39_sub5_sub17.anInt1994 = 0;
						}
						bool &= drawInterface(class39_sub5_sub17s, i, class39_sub5_sub17.anInt1994, class39_sub5_sub17.anInt2084, i_13_, class39_sub5_sub17.anInt2064, i_12_ + class39_sub5_sub17.anInt2104, i_8_, class39_sub5_sub17.anInt2015 + i_13_, i_12_);
						if (class39_sub5_sub17.aClass39_Sub5_Sub17Array2025 != null)
							bool &= drawInterface((class39_sub5_sub17.aClass39_Sub5_Sub17Array2025), i, class39_sub5_sub17.anInt1994, class39_sub5_sub17.anInt2084, i_13_, class39_sub5_sub17.anInt2064, (class39_sub5_sub17.anInt2104 + i_12_), 9843, (i_13_ + class39_sub5_sub17.anInt2015), i_12_);
						Class39_Sub5_Sub10.method619(i_10_, i_5_, i_7_, i_9_);
						if ((class39_sub5_sub17.anInt2015 < class39_sub5_sub17.anInt2095) && !class39_sub5_sub17.aBoolean2013)
							Class4.method102((class39_sub5_sub17.anInt2104 + i_12_), class39_sub5_sub17.anInt1994, class39_sub5_sub17.anInt2095, i_13_, 18734, class39_sub5_sub17.anInt2015);
					}
					if (class39_sub5_sub17.drawType != 1) {
						if (class39_sub5_sub17.drawType == 2) {
							int i_21_ = 0;
							for (int i_22_ = 0; i_22_ < class39_sub5_sub17.anInt2015; i_22_++) {
								for (int i_23_ = 0; class39_sub5_sub17.anInt2104 > i_23_; i_23_++) {
									int i_24_ = i_12_ + (class39_sub5_sub17.anInt2000 + 32) * i_23_;
									int i_25_ = ((class39_sub5_sub17.anInt2010 + 32) * i_22_ + i_13_);
									if (i_21_ < 20) {
										i_25_ += (class39_sub5_sub17.anIntArray2037[i_21_]);
										i_24_ += (class39_sub5_sub17.anIntArray2028[i_21_]);
									}
									if ((class39_sub5_sub17.anIntArray2087[i_21_]) > 0) {
										int i_26_ = ((class39_sub5_sub17.anIntArray2087[i_21_]) - 1);
										boolean bool_27_ = false;
										boolean bool_28_ = false;
										if (((Class39_Sub5_Sub10.anInt1824 - 32 < i_24_) && (Class39_Sub5_Sub10.anInt1823 > i_24_) && i_25_ > (Class39_Sub5_Sub10.anInt1820) - 32 && (Class39_Sub5_Sub10.anInt1819 > i_25_)) || (Class30.anInt534 != 0 && i_21_ == (Class39_Sub9.anInt1403))) {
											Class39_Sub5_Sub10_Sub3 class39_sub5_sub10_sub3;
											if (Class13.anInt208 != 1 || i_21_ != Class23.anInt428 || ((class39_sub5_sub17.anInt2084) != (Class39_Sub10.anInt1430)))
												class39_sub5_sub10_sub3 = (PacketStream.method841(i_26_, 3153952, false, (class39_sub5_sub17.anIntArray2073[i_21_]), i_8_ ^ 0x264d, 1));
											else
												class39_sub5_sub10_sub3 = (PacketStream.method841(i_26_, 0, false, (class39_sub5_sub17.anIntArray2073[i_21_]), 115, 2));
											if (class39_sub5_sub10_sub3 == null)
												bool = false;
											else if (Class30.anInt534 != 0 && (Class39_Sub9.anInt1403 == i_21_) && (OnDemandFetcher.anInt1203 == (class39_sub5_sub17.anInt2084))) {
												int i_29_ = (Class33.anInt599 - (Class39_Sub5_Sub3.anInt1720));
												if (i_29_ < 5 && i_29_ > -5)
													i_29_ = 0;
												int i_30_ = (ISAAC.anInt1091 - (Class39_Sub5_Sub2.anInt1702));
												if (i_30_ < 5 && i_30_ > -5)
													i_30_ = 0;
												if ((RSInterface.anInt2031) < 5) {
													i_30_ = 0;
													i_29_ = 0;
												}
												class39_sub5_sub10_sub3.method676(i_30_ + i_24_, i_29_ + i_25_, 128);
												if (i_4_ != -1) {
													RSInterface class39_sub5_sub17_31_ = (class39_sub5_sub17s[i_4_ & 0xffff]);
													if (((Class39_Sub5_Sub10.anInt1820) > i_29_ + i_25_) && (class39_sub5_sub17_31_.anInt1994) > 0) {
														int i_32_ = ((-i_29_ + ((Class39_Sub5_Sub10.anInt1820) - i_25_)) * (Class45.anInt856) / 3);
														if (i_32_ > (Class45.anInt856 * 10))
															i_32_ = ((Class45.anInt856) * 10);
														if ((class39_sub5_sub17_31_.anInt1994) < i_32_)
															i_32_ = (class39_sub5_sub17_31_.anInt1994);
														Class39_Sub5_Sub3.anInt1720 += i_32_;
														class39_sub5_sub17_31_.anInt1994 -= i_32_;
													}
													if (((Class39_Sub5_Sub10.anInt1819) < i_25_ + i_29_ + 32) && ((class39_sub5_sub17_31_.anInt1994) < (-(class39_sub5_sub17_31_.anInt2015) + (class39_sub5_sub17_31_.anInt2095)))) {
														int i_33_ = ((-(Class39_Sub5_Sub10.anInt1819) + (i_29_ + i_25_) + 32) * (Class45.anInt856) / 3);
														if (i_33_ > (Class45.anInt856 * 10))
															i_33_ = ((Class45.anInt856) * 10);
														if ((-(class39_sub5_sub17_31_.anInt1994) + (-(class39_sub5_sub17_31_.anInt2015) + (class39_sub5_sub17_31_.anInt2095))) < i_33_)
															i_33_ = (-(class39_sub5_sub17_31_.anInt2015) + (class39_sub5_sub17_31_.anInt2095) - (class39_sub5_sub17_31_.anInt1994));
														Class39_Sub5_Sub3.anInt1720 -= i_33_;
														class39_sub5_sub17_31_.anInt1994 += i_33_;
													}
												}
											} else if (Login.anInt459 == 0 || (i_21_ != (Class39_Sub5_Sub5.anInt1739)) || (Class65.anInt1137 != (class39_sub5_sub17.anInt2084)))
												class39_sub5_sub10_sub3.method670(i_24_, i_25_);
											else
												class39_sub5_sub10_sub3.method676(i_24_, i_25_, 128);
										}
									} else if ((class39_sub5_sub17.anIntArray2053) != null && i_21_ < 20) {
										Class39_Sub5_Sub10_Sub3 class39_sub5_sub10_sub3 = (class39_sub5_sub17.method759(i_21_, i_8_ ^ ~0x2673));
										if (class39_sub5_sub10_sub3 == null) {
											if (Class39_Sub5_Sub12.aBoolean1856)
												bool = false;
										} else
											class39_sub5_sub10_sub3.method670(i_24_, i_25_);
									}
									i_21_++;
								}
							}
						} else if (class39_sub5_sub17.drawType == 3) {
							int i_34_;
							if (Class40.method883(class39_sub5_sub17, -111)) {
								i_34_ = class39_sub5_sub17.anInt2067;
								if (Class39_Sub5_Sub1.method473(i, i_8_ - 9844, i_11_) && class39_sub5_sub17.anInt2086 != 0)
									i_34_ = class39_sub5_sub17.anInt2086;
							} else {
								i_34_ = class39_sub5_sub17.anInt2077;
								if (Class39_Sub5_Sub1.method473(i, -1, i_11_) && class39_sub5_sub17.anInt2041 != 0)
									i_34_ = class39_sub5_sub17.anInt2041;
							}
							if (i_14_ == 0) {
								if (!class39_sub5_sub17.aBoolean2076)
									Class39_Sub5_Sub10.method614(i_12_, i_13_, class39_sub5_sub17.anInt2104, class39_sub5_sub17.anInt2015, i_34_);
								else
									Class39_Sub5_Sub10.method611(i_12_, i_13_, class39_sub5_sub17.anInt2104, class39_sub5_sub17.anInt2015, i_34_);
							} else if (class39_sub5_sub17.aBoolean2076)
								Class39_Sub5_Sub10.method624(i_12_, i_13_, class39_sub5_sub17.anInt2104, class39_sub5_sub17.anInt2015, i_34_, -(i_14_ & 0xff) + 256);
							else
								Class39_Sub5_Sub10.method620(i_12_, i_13_, class39_sub5_sub17.anInt2104, class39_sub5_sub17.anInt2015, i_34_, -(i_14_ & 0xff) + 256);
						} else if (class39_sub5_sub17.drawType == 4) { //text
							TextRenderer class39_sub5_sub10_sub1 = class39_sub5_sub17.method752(true);
							if (class39_sub5_sub10_sub1 == null) {
								if (Class39_Sub5_Sub12.aBoolean1856)
									bool = false;
							} else {
								JString class3 = class39_sub5_sub17.text;
								int i_35_;
								if (!Class40.method883(class39_sub5_sub17, -124)) {
									i_35_ = class39_sub5_sub17.anInt2077;
									if (Class39_Sub5_Sub1.method473(i, -1, i_11_) && class39_sub5_sub17.anInt2041 != 0)
										i_35_ = class39_sub5_sub17.anInt2041;
								} else {
									i_35_ = class39_sub5_sub17.anInt2067;
									if (Class39_Sub5_Sub1.method473(i, -1, i_11_) && class39_sub5_sub17.anInt2086 != 0)
										i_35_ = class39_sub5_sub17.anInt2086;
									if (class39_sub5_sub17.aClass3_2048.length() > 0)
										class3 = class39_sub5_sub17.aClass3_2048;
								}
								if (class39_sub5_sub17.aBoolean2013 && class39_sub5_sub17.anInt1997 != -1) {
									Class39_Sub5_Sub1 class39_sub5_sub1 = Class26.method291(-85, (class39_sub5_sub17.anInt1997));
									class3 = class39_sub5_sub1.aClass3_1661;
									if (class3 == null)
										class3 = Class36.aClass3_633;
									if ((class39_sub5_sub1.anInt1662 == 1 || class39_sub5_sub17.anInt2096 != 1) && class39_sub5_sub17.anInt2096 != -1)
										class3 = (Class39_Sub5_Sub11.method708((new JString[] { class3, Class15.aClass3_279, (Class62_Sub2.method1083((class39_sub5_sub17.anInt2096), (byte) -113)) }), 14569));
								}
								if ((class39_sub5_sub17.anInt2084 == Class39_Sub10.anInt1420) && (JString.anInt1231 == class39_sub5_sub17.anInt2102)) {
									class3 = Class39_Sub5_Sub4_Sub2.aClass3_2230;
									i_35_ = class39_sub5_sub17.anInt2077;
								}
								if (Class39_Sub5_Sub10.anInt1821 == 479) {
									if (i_35_ == 16776960)
										i_35_ = 255;
									if (i_35_ == 49152)
										i_35_ = 16777215;
								}
								class3 = Class50.method972(class39_sub5_sub17, 0, class3);
								class39_sub5_sub10_sub1.method625(class3, i_12_, i_13_, class39_sub5_sub17.anInt2104, class39_sub5_sub17.anInt2015, i_35_, class39_sub5_sub17.aBoolean2059, class39_sub5_sub17.anInt2032, class39_sub5_sub17.anInt1996, class39_sub5_sub17.anInt2036);
							}
						} else if (class39_sub5_sub17.drawType == 5) {
							if (!class39_sub5_sub17.aBoolean2013) {
								Class39_Sub5_Sub10_Sub3 class39_sub5_sub10_sub3 = (class39_sub5_sub17.method774(i_8_ - 9844, Class40.method883(class39_sub5_sub17, -111)));
								if (class39_sub5_sub10_sub3 == null) {
									if (Class39_Sub5_Sub12.aBoolean1856)
										bool = false;
								} else
									class39_sub5_sub10_sub3.method670(i_12_, i_13_);
							} else {
								Class39_Sub5_Sub10_Sub3 class39_sub5_sub10_sub3;
								if (class39_sub5_sub17.anInt1997 != -1)
									class39_sub5_sub10_sub3 = (PacketStream.method841(class39_sub5_sub17.anInt1997, class39_sub5_sub17.anInt2003, false, class39_sub5_sub17.anInt2096, 68, class39_sub5_sub17.anInt2022));
								else
									class39_sub5_sub10_sub3 = class39_sub5_sub17.method774(-1, false);
								if (class39_sub5_sub10_sub3 == null) {
									if (Class39_Sub5_Sub12.aBoolean1856)
										bool = false;
								} else {
									int i_36_ = class39_sub5_sub10_sub3.anInt2475;
									int i_37_ = class39_sub5_sub10_sub3.anInt2477;
									if (!class39_sub5_sub17.aBoolean2014) {
										int i_38_ = (class39_sub5_sub17.anInt2104 * 4096 / i_36_);
										if (class39_sub5_sub17.anInt2051 != 0)
											class39_sub5_sub10_sub3.method684(i_12_ + (class39_sub5_sub17.anInt2104) / 2, (class39_sub5_sub17.anInt2015 / 2) + i_13_, class39_sub5_sub17.anInt2051, i_38_);
										else if (i_14_ != 0)
											class39_sub5_sub10_sub3.method680(i_12_, i_13_, class39_sub5_sub17.anInt2104, class39_sub5_sub17.anInt2015, 256 - (i_14_ & 0xff));
										else if ((class39_sub5_sub17.anInt2104 != i_36_) || (class39_sub5_sub17.anInt2015) != i_37_)
											class39_sub5_sub10_sub3.method687(i_12_, i_13_, class39_sub5_sub17.anInt2104, class39_sub5_sub17.anInt2015);
										else
											class39_sub5_sub10_sub3.method670(i_12_, i_13_);
									} else {
										int i_39_ = i_12_;
										int[] is = new int[4];
										Class39_Sub5_Sub10.method623(is);
										if (i_39_ < is[0])
											i_39_ = is[0];
										int i_40_ = i_13_;
										if (i_40_ < is[1])
											i_40_ = is[1];
										int i_41_ = (class39_sub5_sub17.anInt2104 + i_12_);
										int i_42_ = (class39_sub5_sub17.anInt2015 + i_13_);
										if (is[3] < i_42_)
											i_42_ = is[3];
										if (is[2] < i_41_)
											i_41_ = is[2];
										Class39_Sub5_Sub10.method619(i_39_, i_40_, i_41_, i_42_);
										int i_43_ = ((class39_sub5_sub17.anInt2015 + i_37_ - 1) / i_37_);
										int i_44_ = ((class39_sub5_sub17.anInt2104 - (-i_36_ + 1)) / i_36_);
										for (int i_45_ = 0; i_45_ < i_44_; i_45_++) {
											for (int i_46_ = 0; i_43_ > i_46_; i_46_++) {
												if ((class39_sub5_sub17.anInt2051) != 0)
													class39_sub5_sub10_sub3.method684((i_45_ * i_36_ + i_12_ + i_36_ / 2), (i_13_ + i_37_ * i_46_ + i_37_ / 2), (class39_sub5_sub17.anInt2051), 4096);
												else if (i_14_ != 0)
													class39_sub5_sub10_sub3.method676(i_12_ + i_45_ * i_36_, i_37_ * i_46_ + i_13_, (-(i_14_ & 0xff) + 256));
												else
													class39_sub5_sub10_sub3.method670(i_45_ * i_36_ + i_12_, (i_46_ * i_37_ + i_13_));
											}
										}
										Class39_Sub5_Sub10.method621(is);
									}
								}
							}
						} else if (class39_sub5_sub17.drawType == 6) {
							boolean bool_47_ = Class40.method883(class39_sub5_sub17, i_8_ - 9834);
							int i_48_;
							if (bool_47_)
								i_48_ = class39_sub5_sub17.anInt2052;
							else
								i_48_ = class39_sub5_sub17.anInt2103;
							Object object = null;
							Model class39_sub5_sub4_sub6;
							if (class39_sub5_sub17.anInt2009 == 5) {
								if (class39_sub5_sub17.anInt2026 == 0)
									class39_sub5_sub4_sub6 = (Class39_Sub5_Sub2.aClass45_1705.method922(-27537, null, null, -1, -1));
								else
									class39_sub5_sub4_sub6 = Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.method489(true);
							} else if (i_48_ == -1) {
								class39_sub5_sub4_sub6 = (class39_sub5_sub17.method775(i_8_ - 9861, -1, bool_47_, (Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.aClass45_2516), null));
								if (class39_sub5_sub4_sub6 == null && Class39_Sub5_Sub12.aBoolean1856)
									bool = false;
							} else {
								Class39_Sub5_Sub11 class39_sub5_sub11 = Class62_Sub1.method1064(i_48_, (byte) 54);
								class39_sub5_sub4_sub6 = (class39_sub5_sub17.method775(-99, class39_sub5_sub17.anInt1999, bool_47_, (Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.aClass45_2516), class39_sub5_sub11));
								if (class39_sub5_sub4_sub6 == null && Class39_Sub5_Sub12.aBoolean1856)
									bool = false;
							}
							int i_49_ = class39_sub5_sub17.anInt2098;
							int i_50_ = class39_sub5_sub17.anInt2011;
							int i_51_ = class39_sub5_sub17.anInt2007;
							int i_52_ = class39_sub5_sub17.anInt2072;
							int i_53_ = class39_sub5_sub17.anInt2058;
							int i_54_ = class39_sub5_sub17.anInt2074;
							if (class39_sub5_sub17.anInt1997 != -1) {
								Class39_Sub5_Sub1 class39_sub5_sub1 = Class26.method291(-97, (class39_sub5_sub17.anInt1997));
								if (class39_sub5_sub1 != null) {
									class39_sub5_sub1 = (class39_sub5_sub1.method476(class39_sub5_sub17.anInt2096, (byte) 71));
									class39_sub5_sub4_sub6 = class39_sub5_sub1.method468(1, true, (byte) -123);
									i_52_ = class39_sub5_sub1.anInt1674;
									i_54_ = class39_sub5_sub1.anInt1649;
									i_49_ = class39_sub5_sub1.anInt1669;
									i_51_ = class39_sub5_sub1.anInt1656;
									i_53_ = class39_sub5_sub1.anInt1654;
									if (class39_sub5_sub17.anInt2104 > 0)
										i_54_ = (i_54_ * 32 / class39_sub5_sub17.anInt2104);
									i_50_ = class39_sub5_sub1.anInt1676;
								}
							}
							Rasterizer.method659(i_12_ + class39_sub5_sub17.anInt2104 / 2, i_13_ + class39_sub5_sub17.anInt2015 / 2);
							int i_55_ = ((Rasterizer.anIntArray2456[i_49_]) * i_54_ >> 16);
							int i_56_ = ((Rasterizer.anIntArray2469[i_49_]) * i_54_ >> 16);
							if (class39_sub5_sub4_sub6 != null) {
								if (!class39_sub5_sub17.aBoolean2013)
									class39_sub5_sub4_sub6.method549(0, i_50_, 0, i_49_, 0, i_56_, i_55_);
								else {
									class39_sub5_sub4_sub6.method542();
									if (class39_sub5_sub17.aBoolean2081)
										class39_sub5_sub4_sub6.render(0, i_50_, i_51_, i_49_, i_52_, (class39_sub5_sub4_sub6.anInt1726 / 2) + i_56_ + i_53_, i_55_ + i_53_, i_54_);
									else
										class39_sub5_sub4_sub6.method549(0, i_50_, i_51_, i_49_, i_52_, i_53_ + (class39_sub5_sub4_sub6.anInt1726) / 2 + i_56_, i_55_ + i_53_);
								}
							}
							Rasterizer.method654();
						} else {
							if (class39_sub5_sub17.drawType == 7) {
								TextRenderer class39_sub5_sub10_sub1 = class39_sub5_sub17.method752(true);
								if (class39_sub5_sub10_sub1 == null) {
									if (Class39_Sub5_Sub12.aBoolean1856)
										bool = false;
									continue;
								}
								int i_57_ = 0;
								for (int i_58_ = 0; i_58_ < class39_sub5_sub17.anInt2015; i_58_++) {
									for (int i_59_ = 0; i_59_ < class39_sub5_sub17.anInt2104; i_59_++) {
										if ((class39_sub5_sub17.anIntArray2087[i_57_]) > 0) {
											Class39_Sub5_Sub1 class39_sub5_sub1 = (Class26.method291(-35, (class39_sub5_sub17.anIntArray2087[i_57_]) - 1));
											JString class3 = (class39_sub5_sub1.aClass3_1661);
											if (class3 == null)
												class3 = Class36.aClass3_633;
											if ((class39_sub5_sub1.anInt1662 == 1) || ((class39_sub5_sub17.anIntArray2073[i_57_]) != 1))
												class3 = (Class39_Sub5_Sub11.method708((new JString[] { class3, Class15.aClass3_279, (Class62_Sub2.method1083((class39_sub5_sub17.anIntArray2073[i_57_]), (byte) -115)) }), i_8_ ^ 0x1e9a));
											int i_60_ = ((i_59_ * (115 + (class39_sub5_sub17.anInt2000))) + i_12_);
											int i_61_ = (i_58_ * ((class39_sub5_sub17.anInt2010) + 12) + i_13_);
											if (class39_sub5_sub17.anInt2032 != 0) {
												if ((class39_sub5_sub17.anInt2032) != 1)
													class39_sub5_sub10_sub1.method627(class3, (i_60_ + (class39_sub5_sub17.anInt2104) - 1), i_61_, (class39_sub5_sub17.anInt2077), (class39_sub5_sub17.aBoolean2059));
												else
													class39_sub5_sub10_sub1.method636(class3, (i_60_ + (class39_sub5_sub17.anInt2104) / 2), i_61_, (class39_sub5_sub17.anInt2077), (class39_sub5_sub17.aBoolean2059));
											} else
												class39_sub5_sub10_sub1.method635(class3, i_60_, i_61_, (class39_sub5_sub17.anInt2077), (class39_sub5_sub17.aBoolean2059));
										}
										i_57_++;
									}
								}
							}
							if (class39_sub5_sub17.drawType == 8 && Class53.method986(i_11_, i, 1) && (Class30.anInt548 == PacketStream.anInt2157)) {
								int i_62_ = 0;
								int i_63_ = 0;
								JString class3 = class39_sub5_sub17.text;
								TextRenderer class39_sub5_sub10_sub1 = (Tile.aClass39_Sub5_Sub10_Sub1_1903);
								class3 = Class50.method972(class39_sub5_sub17, 0, class3);
								while (class3.length() > 0) {
									int i_64_ = class3.indexOf((Class39_Sub5_Sub9.aClass3_1814));
									JString class3_65_;
									if (i_64_ != -1) {
										class3_65_ = class3.substring(0, i_64_);
										class3 = class3.substring(i_64_ + 2);
									} else {
										class3_65_ = class3;
										class3 = Class66.aClass3_1164;
									}
									int i_66_ = class39_sub5_sub10_sub1.method646(class3_65_);
									if (i_66_ > i_63_)
										i_63_ = i_66_;
									i_62_ += (class39_sub5_sub10_sub1.anInt2425 + 1);
								}
								i_63_ += 6;
								int i_67_ = (class39_sub5_sub17.anInt2104 - 5 + (i_12_ - i_63_));
								i_62_ += 7;
								int i_68_ = class39_sub5_sub17.anInt2015 + 5 + i_13_;
								if (i_9_ < i_68_ + i_62_)
									i_68_ = -i_62_ + i_9_;
								if (i_12_ + 5 > i_67_)
									i_67_ = i_12_ + 5;
								if (i_7_ < i_67_ + i_63_)
									i_67_ = -i_63_ + i_7_;
								Class39_Sub5_Sub10.method611(i_67_, i_68_, i_63_, i_62_, 16777120);
								Class39_Sub5_Sub10.method614(i_67_, i_68_, i_63_, i_62_, 0);
								class3 = class39_sub5_sub17.text;
								int i_69_ = (class39_sub5_sub10_sub1.anInt2425 + 2 + i_68_);
								class3 = Class50.method972(class39_sub5_sub17, 0, class3);
								while (class3.length() > 0) {
									int i_70_ = class3.indexOf((Class39_Sub5_Sub9.aClass3_1814));
									JString class3_71_;
									if (i_70_ != -1) {
										class3_71_ = class3.substring(0, i_70_);
										class3 = class3.substring(i_70_ + 2);
									} else {
										class3_71_ = class3;
										class3 = Class66.aClass3_1164;
									}
									class39_sub5_sub10_sub1.method635(class3_71_, i_67_ + 3, i_69_, 0, false);
									i_69_ += (class39_sub5_sub10_sub1.anInt2425 + 1);
								}
							}
							if (class39_sub5_sub17.drawType == 9) {
								if (class39_sub5_sub17.anInt2083 == 1)
									Class39_Sub5_Sub10.method612(i_12_, i_13_, class39_sub5_sub17.anInt2104 + i_12_, i_13_ + class39_sub5_sub17.anInt2015, class39_sub5_sub17.anInt2077);
								else {
									int i_72_ = (class39_sub5_sub17.anInt2104 >= 0 ? class39_sub5_sub17.anInt2104 : -class39_sub5_sub17.anInt2104);
									int i_73_ = (class39_sub5_sub17.anInt2015 >= 0 ? class39_sub5_sub17.anInt2015 : -class39_sub5_sub17.anInt2015);
									int i_74_ = i_72_;
									if (i_74_ < i_73_)
										i_74_ = i_73_;
									if (i_74_ != 0) {
										int i_75_ = ((class39_sub5_sub17.anInt2104 << 16) / i_74_);
										int i_76_ = ((class39_sub5_sub17.anInt2015 << 16) / i_74_);
										if (i_76_ <= i_75_)
											i_75_ = -i_75_;
										else
											i_76_ = -i_76_;
										int i_77_ = ((class39_sub5_sub17.anInt2083 * i_76_) >> 17);
										int i_78_ = (i_76_ * (class39_sub5_sub17.anInt2083) + 1 >> 17);
										int i_79_ = ((class39_sub5_sub17.anInt2083 * i_75_) >> 17);
										int i_80_ = ((class39_sub5_sub17.anInt2083 * i_75_) + 1 >> 17);
										int i_81_ = i_77_ + i_12_;
										int i_82_ = (class39_sub5_sub17.anInt2104 + (i_12_ - i_78_));
										int i_83_ = (i_13_ + (class39_sub5_sub17.anInt2015 - i_80_));
										int i_84_ = -i_80_ + i_13_;
										int i_85_ = -i_78_ + i_12_;
										int i_86_ = (i_12_ + (class39_sub5_sub17.anInt2104 + i_77_));
										int i_87_ = (i_79_ + i_13_ + class39_sub5_sub17.anInt2015);
										Rasterizer.method666(i_81_, i_85_, i_82_);
										int i_88_ = i_79_ + i_13_;
										Rasterizer.method662(i_88_, i_84_, i_83_, i_81_, i_85_, i_82_, class39_sub5_sub17.anInt2077);
										Rasterizer.method666(i_81_, i_82_, i_86_);
										Rasterizer.method662(i_88_, i_83_, i_87_, i_81_, i_82_, i_86_, class39_sub5_sub17.anInt2077);
									}
								}
							}
						}
					}
				}
			}
		}
		if (i_8_ != 9843)
			return true;
		return bool;
	}

	static {
		aClass3_388 = Class39_Sub5_Sub9.createJString(127, "Please try again)3");
		aClass3_394 = Class39_Sub5_Sub9.createJString(120, "@or1@");
		anInt393 = 0;
		aClass3_387 = aClass3_388;
		groundItems = new Deque[4][104][104];
		anInt397 = 0;
	}
}
